package lab01;

/**
 * Created by dell on 2017/10/17.
 */
//13、	找出1-1000所有的水仙花数并输出。

public class Text13 {

    public static void main(String[] args) {
    //
        int theUnit;
        int decade;
        int hundreds;
        int i;
        for(i = 100 ;i < 1000;i++){
            hundreds = i/100;
            decade = i%100/10;
            theUnit = i%10;

            if(hundreds*hundreds*hundreds+ decade*decade*decade+theUnit*theUnit*theUnit == i)
                System.out.println(i);
        }
    }
}
